<template>
    <div>
        <div>
            <el-tabs v-model="activeName" @tab-click="handleClick">
                <!-- 工具栏 -->
                <Tools></Tools>

                <!-- 我的项目 -->
                <el-tab-pane label="我的项目" name="first">
                    <List :list="my_list"></List>
                </el-tab-pane>

                <!-- 参与的项目 -->
                <el-tab-pane label="参与的项目" name="second">
                    <el-row :gutter="20">
                        <el-col :span="8" v-for="(o, index) in 3" :key="o" >
                            <el-card :body-style="{ padding: '0px' }">
                                <div style="padding: 14px;">
                                    <span>好吃的汉堡</span>
                                    <div class="bottom clearfix">
                                        <time class="time">2021-08-30</time>
                                        <el-button type="text" class="button">操作按钮</el-button>
                                    </div>
                                </div>
                            </el-card>
                        </el-col>
                    </el-row>
                </el-tab-pane>
            </el-tabs>
        </div>
    </div>
</template>

<script>
import List from "../../components/Project/List";
import Tools from "../../components/Project/Tools";
import instance from "../../assets/config/instance";

export default {
    name: "MyList",
    components: {Tools, List},
    data(){
        return {
            activeName : 'first',
            my_list : [
                {
                    id : 1,
                    title : '爱眼员工满意度调查适当放宽历史记录深度交流看十分士大夫的法是',
                    state : 1,
                    state_txt : '未发布',
                    statistics : 20,
                    type: 1,
                    type_txt : instance.getTypeName(1),
                    updated_time : '2021-09-11 16:30:50',
                    created_time : '2021-09-10 11:20:30'
                },
                {
                    id : 2,
                    title : '第三方看了就凉快圣诞节了是',
                    state : 2,
                    state_txt : '收集中',
                    statistics : 20,
                    type: 1,
                    type_txt : instance.getTypeName(1),
                    updated_time : '2021-09-11 16:30:50',
                    created_time : '2021-09-10 11:20:30'
                }
            ]
        }
    },
    methods: {
        handleClick(){
            console.log('点击事件');
        }
    }
}
</script>

<style lang="scss" scoped>
   @import "../../assets/theme";
</style>